package practice;

public class Test01 {
    public static void main(String[] args) {
//        1.定义变量记录着折叠次数
        int count = 0;
//        2.循环初始化表达式：
        double paper = 0.1;
//        3.布尔表达式：paper <= 8844430.0
        //定义变量保存珠穆朗玛峰高度
        double height = 8844430;
        System.out.println("height = " + height);
        while (paper <= height) {
            //可以折叠
//        4.修改布尔表达式：
            paper = paper * 2;
//        5.循环体：计数器count+1
            count = count + 1;
        }
//        for(double paper = 0.1, height = 8844430;paper <= height;paper = paper * 2){
//
//        }
//        6.在循环外部输出计数器次数
        System.out.println("次数是 ： " + count);
    }
}